package com.sljy.hzk.ui.fragment;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.LinearLayout;

import com.sljy.hzk.R;
import com.sljy.hzk.entity.ExamMainEntity;
import com.sljy.hzk.ui.fragment.lazyfragment.LazyFragment;
import com.sljy.hzk.view.DividerItemDecoration;
import com.sljy.hzk.view.adapter.ExamPlanAdapter;

import java.util.List;

import butterknife.BindView;
/**
 * Created  on 2018/7/4 0004
 * @author 唐开阔
 * @describe 考试安排
 */
public class ExamPlanFragment extends LazyFragment {
    @BindView(R.id.recycer)
    RecyclerView recycerView;
    public ExamPlanAdapter examPlanAdapter;
    private List<ExamMainEntity.ExamListBean> examListBeans;
    public static ExamPlanFragment get( List<ExamMainEntity.ExamListBean> examListBeans){
        ExamPlanFragment fragment = new ExamPlanFragment();
        fragment.examListBeans = examListBeans;
        return fragment;
    }
    @Override
    protected int getResId() {
        return R.layout.fragment_exam_plan;
    }

    @Override
    protected void onRealViewLoaded(View view) {
        examPlanAdapter = new ExamPlanAdapter(examListBeans,getContext());
        recycerView.setLayoutManager(new LinearLayoutManager(getContext()));
        recycerView.addItemDecoration(new DividerItemDecoration(getContext(), LinearLayout.VERTICAL));
        recycerView.setAdapter(examPlanAdapter);
    }
}
